<template>
	<view>
		<view class="fund-header">
			<view class="layout">				
				<view class="fund-header-backend" @click="handleBackendButton()">
					<image src="../../../static/icon/icon-back.png"></image>
				</view>
				<view class="fund-header-tooltip">
					订单
				</view>
				<view class="fund-header-more">
					<image src="../../../static/icon/icon-moer.png"></image>
				</view>
			</view>
		</view>
		<view>
			<view class="order-block-item layout" v-for="(order,index) in orderList" :key="index">
				<view class="order-block-item-tooltip">					
					<view class="order-block-item-tooltip-text">
						{{order.orderTitle}}
					</view>
					<view class="order-block-item-tooltip-time">{{order.orderTime}}</view>
				</view>
				<view class="order-block-item-volume">￥{{order.amount}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderTotal:0,
				orderList:[],
				filterForm:{
					page:1,
					size:10
				}
			}
		},
		onLoad(options) {
			
		},
		onShow() {
			this.refreshCustomerList()
		},
		methods: {
			handleBackendButton:function(){
				let jumpUrl = "/pages/distribution/main/main"
				uni.redirectTo({
					url:jumpUrl
				})
			},
			refreshCustomerList:function(){
				let _this = this;
				
				_this.$distribution.getOrderList(_this.filterForm).then(res=>{
					console.log(res)
					if(res.code == 200){
						_this.orderList = res.data.list;
						_this.orderTotal = res.data.total;
					}
				})
			}
		}
	}
</script>

<style>
page { padding-top: 100rpx; padding-bottom: 120rpx; background: #ededed; font-size: 14px; }
.fund-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.fund-header { background: #fff; padding: 15rpx; }

.fund-header-backend { width: 50rpx; height: 40rpx; }
.fund-header-tooltip { width: 600rpx; text-align: center; }
.fund-header-more { width: 50rpx; height: 40rpx; }
.order-block-item { border-bottom: #ededed 1px solid; padding:15rpx 10rpx; background: #fff; }
.order-block-item-tooltip { width: 400rpx;}
.order-block-item-tooltip-text { font-size:16px; padding-bottom: 25rpx; font-weight: 900; }
.order-block-item-tooltip-time { font-size:14px; color:#666; }
.order-block-item-volume { width:300rpx; height: 80rpx; line-height: 80rpx; text-align:right; font-size: 18px; font-weight: bold; color:red;}
</style>
